1. Field of the Invention
The present invention relates to a coding device and, more particularly, to a device for coding digital data such as an audio signal, a video signal or the like having a correlation among data.
2. Related Background Art
Various kinds of coding methods have been proposed as a method of narrowing a transmission band, that is, a method of reducing the amount of transmission information in the case of digitally transmitting information such as a video signal or audio signal. For instance, there has been known a predictive coding method (DPCM) for compressing information amount by using the correlation between adjacent sample values. In the DPCM, a predictive value for a sample value to be coded is obtained from a decoded value of a coding code which is transmitted, a difference value (predictive error) between the predictive value and the sample value is quantized, and the coding code obtained by such a quantization is transmitted. Various predictive coding methods are provided in accordance with a method of producing the predictive value. Among them, FIG. 1 is a block diagram showing a fundamental construction of a coding device of the simplest previous value predictive coding method (predictive coding method which uses a preceding decoded value as a predictive value).
In FIG. 1, a subtracter 12 subtracts a predictive value x.sub.ip (previous value decoded value in the embodiment of FIG. 1) from a sample value x.sub.i which is input to an input terminal 10 and outputs a difference value e.sub.i. A quantization unit 14 quantizes the difference value e.sub.i and outputs a coding code y.sub.i. The coding code y.sub.i is transmitted from an output terminal 16 to a transmission path. The coding code y.sub.i is also supplied to an inverse quantization unit 18. The inverse quantization unit 18 converts the coding code y.sub.i into a difference value (quantization representative value Q(e.sub.i)). The predictive value is added to the quantization representative value Q(e.sub.i) by an adder 20, so that the input sample value can be restored. Since the restored input sample value x.sub.i includes a quantization error, there is a possibility that it may exceed a range of the original input sample value. Therefore, the range is amplitude limited by a limiter 22. An output of the limiter 22 is a local decoded value x.sub.i which is input to a D flip-flop (predictor) 24. In the example, since the previous value decoded value is set to a predictive value, the predictor is constructed by a D flip-flop, that is, a delay circuit having a delay time corresponding to one sample period (one clock cycle). In the next clock cycle, the D flip-flop 24 supplies the local decoded value x.sub.i as a predictive value to the subtracter 12 and adder 20. The predictive value for the sample value x.sub.i is written as x.sub.ip by adding a subscript "p".
Generally, a probability distribution of the difference values between the predictive values and the input sample values is one-sided in a portion which as a small value. The information amount can be compressed by finely setting quantization steps having a portion of a small difference and by coarsely setting (non-linear quantization) a portion which has a large difference.
However, in the conventional example, in the case where the difference value "0" is used as a quantization representative value and there are used midtread type quantization characteristics in which the quantization representative values are arranged symmetrically with respect to the positive and negative values, the number of quantization representative values is set to an odd number. On the other hand, since the number of quantization representative values which can be expressed by n bits is 2.sup.n, in the case where the DPCM code is set to an n-bit fixed length, one code remains. FIG. 2 is a diagram showing such midtread type quantization characteristics.
That is, for instance, assuming that a coding code consists of four bits, there are fifteen coding codes other than the coding code corresponding to the difference value "0". Seven coding codes are assigned to the positive quantization representative values, and seven to the negative quantization representative values. Therefore, the quantization steps become coarse and in the case of coding a video signal, there is a large possibility that a large quantization error is generated in the edge portion of an image, namely, what is called an edge business or the like occurs. On the other hand, when the quantization steps are daringly reduced, gradient overload noises or the like are generated.
On the other hand, in the case of using midriser type quantization characteristics in which the difference value "0" is not used as a quantization representative value, eight coding codes can be assigned to the positive quantization representative values and eight to the negative quantization representative values, and the quantization steps themselves can be relatively decreased. However, on a flat screen, in the case where the difference value "0" is not used as a quantization representative value, the decoded value changes in spite of the fact that the screen is flat, so that what is called a granular noise or the like easily occurs.